package com.djsearch.ui;

import android.content.Context;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.Window;
import android.widget.Button;

import com.djsearch.R;
import com.djsearch.controller.JSONResp;

/**
 * 酒店详情页面
 * @author chenyang2
 *
 */
public class JiuDianDetailsActivity extends BaseActivity {

	private Context mContext;
	private Button backBtn;
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		getWindow().requestFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.jiudian_details_layout);
		mContext = this;
		//得到屏幕的分辨率
		getDisPlayMetrics();
		//初始化主界面
		initView();
		//初始化主界面相关点击事件
		initOnClick();
		//
		initHandler();
	}
	@Override
	void initHandler() {
		// TODO Auto-generated method stub

	}

	@Override
	void initView() {
		// TODO Auto-generated method stub

		backBtn = (Button)findViewById(R.id.btnBack);
	}

	@Override
	void initOnClick() {
		// TODO Auto-generated method stub

		backBtn.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
			    startActivity(mContext, JiuDianActivity.class, 1)	;
			}
		});
	}

	
	/**
	 * 点击返回键
	 */
	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		// TODO Auto-generated method stub
		if (keyCode == KeyEvent.KEYCODE_BACK) {
			startActivity(mContext, JiuDianActivity.class, 1)	;
		}
		return false;
	}
	@Override
	void getDataToResolve(JSONResp response) {
		// TODO Auto-generated method stub
		
	}
}
